package xin.marcher.wind.consistency.alertm;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Component;
import xin.marcher.wind.consistency.custom.alerter.ConsistencyFrameworkAlerter;
import xin.marcher.wind.consistency.model.ConsistencyTaskInstance;

/**
 * 自定义告警通知类  需要实现 ConsistencyFrameworkAlerter 类
 *
 * @author marcher
 **/
@Component
public class NormalAlerter implements ConsistencyFrameworkAlerter {

    private static final Logger LOG = LoggerFactory.getLogger(NormalAlerter.class);

    /**
     * 发送告警通知 拿到告警实例通知给对应的人 要通知的人 在该方法中实现即可
     *
     * @param consistencyTaskInstance 发送告警通知
     */
    @Override
    public void sendAlertNotice(ConsistencyTaskInstance consistencyTaskInstance) {
        LOG.info("执行告警通知逻辑... 方法签名为：{}", consistencyTaskInstance.getMethodSignName());
    }

}
